<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>注册</title>
		<%@ include file="/common/meta.jsp"%>
		<link rel="stylesheet" href="${ctx}/css/reset.css"/>
		<link rel="stylesheet" href="${ctx}/css/register.css"/>
		<script type="text/javascript" src="${ctx}/js/jquery-1.7.2.min.js"></script>
	</head>
	<body>
		<div class="container">
			<div class="header clearfix">
				<div class="functions" id="rolllink">
					<a href="${ctx}/index.jsp">已有账号登录</a>
				</div>
			</div>
			<dl class="regbody clearfix">
				<dt class="regtype left" id="rtypes">
					<a href="javascript:void(0)" rel="#user" class="rtype user selected">用户</a>
					<a href="javascript:void(0)" rel="#docr" class="rtype docr">医生</a>
				</dt>
				<dd class="regform left">
					<div class="apply" id="user">
						<form action="user/user-register.html" class="clearfix" method="post">
							<div class="email bg">
								<input type="text" id="usermail" name="email"/>
								<label for="usermail">邮箱</label>
								<span>邮箱报错</span>
							</div>
							<div class="name bg">
								<input type="text" id="username" name="username"/>
								<label for="username">用户名</label>
								<span>姓名报错，还是可以写蛮长一段话的了</span>
							</div>
							<div class="info bg">
								<textarea id="userinfo" name="info" cols="30" rows="10"></textarea>
								<label for="userinfo">个人简介（工作行业、有无病史，或者一些个人的简单介绍）</label>
							</div>
							<button type="submit" class="applybtn">申请注册<b></b></button>
						</form>
					</div>
					<div class="apply hide" id="docr">
						<form action="user/doctor-register.html" class="clearfix" method="post">
							<div class="email bg">
								<input type="text" id="docrmail" name="email"/>
								<label for="docrmail">邮箱</label>
								<span>邮箱报错，还是可以写蛮长de一段话了</span>
							</div>
							<div class="name bg">
								<input type="text" id="docrname" name="username"/>
								<label for="docrname">真实姓名</label>
								<span>姓名报错</span>
							</div>
							<div class="info bg">
								<textarea id="docrinfo" name="info" cols="30" rows="10"></textarea>
								<label for="docrinfo">个人简介（职业背景、专业技能，比如外科医生、民事律师）</label>
							</div>
							<button type="submit" class="applybtn">申请注册<b></b></button>
						</form>
					</div>
				</dd>
			</dl>
			
			<div class="foot">
				医宝网版权所有&nbsp;&nbsp;&copy;2012-2013&nbsp;&nbsp;<a href="#">京ICP备10217266号</a>&nbsp;&nbsp;<a href="#">联系我们</a>&nbsp;&nbsp;<a href="#">友情链接</a>
			</div>
		</div>
		
		<script type="text/javascript">
		$(document).ready(function(){
			// 注册类型选择效果
			var tabs = function(event) {
				var target = $(this.rel);
				$(this).addClass(event.data.cls).siblings().removeClass(event.data.cls);
				$(target).show().siblings('div').hide();
			};
			$('#rtypes').find('a').bind('click',{cls:'selected'},tabs);

			// 输入文字后提示消失效果
			var inputs = $('#usermail, #username, #userinfo, #docrmail, #docrname, #docrinfo');
			inputs.val('');
			inputs.bind('keyup focus',function(){
				var label = $(this).siblings('label');
				if($(this).val() === '') { // 绝对空：.replace(/(^\s*|\s*$)/gi,'')===''
					label.show();
				} else {
					label.hide();
				}
			});
		});
		</script>
	</body>
</html>